package com.ethan.cj.ssm.service;

import com.ethan.cj.ssm.entity.Mechanism;

import java.util.List;
import java.util.Map;

public interface MechanismService {

    /**
     * 查询所有信息
     * @return
     */
    List<Mechanism> listMechanism();

    /**
     * 分页查询
     * @param page
     * @param limit
     * @param mname
     * @return
     */
    Map<Object, Object> getMechanismList(int page, int limit, Map<String, Object> mname);

    /**
     * 增加一条数据
     * @param mechanism
     * @return
     */
    Map<Object, Object> addMechanism(String mechanism);

    /**
     * 删除一条信息
     * @param mid 机构ID
     * @return
     */
    Map<Object, Object> deleteMechanism(int mid);

    /**
     * 根据id来查找机构详细信息
     * @param mid
     * @return
     */
    Mechanism selectMechanismMid(int mid);

    /**
     * 修改一条信息
     * @param mechanismJson
     * @return
     */
    Map<Object, Object> updateMechanism(String mechanismJson);

    /**
     * 生成FW+6位数字
     * @return
     */
    String ss();
}
